/**
 * Created by Administrator on 15-8-14.
 */
var StageBox = RichBase.extend({
	statics : {
		width : 50,
		height : 50
	},
	EVENTS : {
		"mousedown" : "onMouseDown",
		"mousemove" : "onMouseMove",
		"mouseup" : "onMouseUp"
	},
	tpl : $("#stageBoxTpl").html(),
	init : function(opt){
		this.opt = opt || {};
		this.opt["width"] = this.statics.width;
		this.opt["height"] = this.statics.height;
		this.container = opt.container;
	},
	render : function(){
		return this.parseTemplate(this.tpl,this.opt);
	},
	render_old : function(){
		var opt = this.opt;
		var container = this.container;
		var row_id = opt.row_id;
		var row = opt.row;
		var col_id = opt.col_id;
		var col = opt.col;
		var seat = opt.seat;
		var state = opt.state;
		var zone_id = opt.zone_id;
		var width = opt["width"] = this.statics.width;
		var height = opt["height"] = this.statics.height;
		container.width(width).height(height)
			.attr("id","stageBox_"+row_id+"_"+col_id)
			.attr("class","stageBox box")
			.attr("data-areaid","")
			.attr("data-row",row)
			.attr("data-col",col)
			.attr("data-seat",seat)
			.attr("data-state",state)
			.attr("data-zoneid",zone_id)
		return container;
	}
});

module.exports = StageBox;